package org.looop.studio.noots.extension;

import java.util.Map;

import org.apache.lucene.index.Term;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.TermQuery;
import org.looop.studio.noots.BaseTestCase;

public class HitCollectorTest extends BaseTestCase {
	public void testCollecting() throws Exception {
		TermQuery query = new TermQuery(new Term("contents", "junit"));
		IndexSearcher searcher = new IndexSearcher(createBookIndex());
		BookLinkCollector collector = new BookLinkCollector(searcher);
		searcher.search(query, collector);
		searcher.close();
		
		Map linkMap = collector.getLinks();
		
		
	}
}
